1. Field of the Invention
The present invention relates to a bit searching circuit for searching a bit string consisting of "1" and "0". More particularly, it relates to a bit searching circuit which successively searches all of the bits in the bit string by plural process.
The present invention also relates to a data processor having plural data transfer instructions for transferring data stored in a register having the register number indicated by a register list represented by the bit string consisting of "1" and "0", more particularly searches all of the bits in the register list by a bit searching circuit, and decomposes the instruction which transfers plural data by one instruction into plural internal codes for processing.
2. Description of the Related Art
In a conventional data processor, a configuration is adopted insert that about 16 general purpose registers are provided for the purpose of rapidly accessing data which are used at a high frequency, with a simple mechanism, and such that data to be accessed at a high frequency or an intermediate operation result is held in the registers.
In software processing, a method of replacing data kept in the registers at each round of serial processing is used. Therefore, such processes as storing plural data from the registers into a memory in series, or conversely, loading plural data to the registers from the memory in series are performed frequently. In high-level languages such as C or Pascal, a method of rearranging variables which are used frequently on the register at every procedure is often used, and in softwares designed in these languages, plural data are quite often stored into memory from the register or loaded to the register from the memory.
From such circumstances, a data processor including a plural data transfer instruction for storing plural data into memory from the register by one instruction, or loading plural data to registers from memory by one instruction is proposed.
In such plural data transfer instruction, a method is used for indicating the registers to which data are transferred or form which a data are transferred, by the register list which is a bit string consisting of "0" and "1". Thus, such register list must be searched to encode the register numbers holding data to be transferred at high speed. An encoder circuit called a priority encoder is a hardware device proposed for such purposes.
A method of rapidly searching and encoding the register number to be transferred from the register list by using a bit searching circuit using a priority encoder is particularly disclosed, for example, in the inventions of U.S. Pat. No. 4,348,741 and Japanese Patent Application Laid-Open No. 2-231966(1990).
Now, in the conventional bit searching circuit, the idea of managing the total number of bits of "1" or "0" to be searched is not adopted, and the bit of "1" or "0" is searched by the priority encoder from the bit position designated by an offset designating circuit. Thus, after-processing is necessary for further searching the remaining bits after the last bit of "1" or "0" is searched in order to check whether or not all of the bits have been searched. Therefore, a long processing time is necessary for finishing the search processing.
In a data processor using the conventional bit searching circuit as stated above, when designating the registers storing data to be operated by the register list to process an instruction for transferring plural data by one instruction, processing of the plural data transferring instruction is finished on confirmation of end of operation of all data. Thus after-processing is necessary for searching the last bit of the register list after finishing the actual processing. Therefore, it takes a long time to process the instruction as aforementioned.